#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<string.h>
#include<Windows.h>
int panduan(char s1[], char s2[])
{
	char arr[100];
	int len1= strlen(s1);
	int len2 = strlen(s2);
	if (len1 != len2)
		return 0;
	if (len1 == 0)
		return 1;
	for (int j = 0; j < len1; j++)
	{
        for (int i = 0; i < len1; i++)
		{
		 arr[i] = s1[(i + j) % len1];
		}
		arr[len1] = '\0';
		if (strcmp(s2, arr) == 0)
		{
			return 1;
		}
	}
	return 0;
}
int main()
{
	char arr1[100] = "ABCDE";
	char arr2[100] = "BCDEA";
	int n = panduan(arr1, arr2);
	printf("%d", n);
	Sleep(1000);
	return 0;
}